<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title><style>
 .box{
            width: 200px;
            height: 50px;
            border: 1px solid red;
            font-size: 50px;
            margin: 0 auto;
            padding: 200px;
            text-align: center;
          }
        #but{
            position: relative;
            left: 150px;
    </style>
</head>
<body>
    <div class="box"> 张三</div>
    <input type="button"value='开始点名'id='but'>
</body>
<script>
    var obox = document.getElementsByClassName('box')[0]
        var but  = document.getElementById('but')
        var but1  = document.getElementById('but1')
       

        console.log(obox,but)
        but.onclick = function(){
            but.value='暂停点名'

            if(but.value===true){
                value='开始点名'
            }
            obox.innerHTML='fun()'
            
            console.log(fun())

           
            for(var i=0 ;i<arr.lenght;i++){
                console.log(i)
            }
        }




        var arr= ['李1','李2','李3','李4','李5',]
             for(var i=0 ;i<arr;i++){
                console.log(i)
            }




            function fun( max,min){
                    return Math.round(Math.random()* (max-min) + min)
                }
                i=(fun(1,9))  

</script>
</html>